package com.sdy.supermarket.biz.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sdy.common.model.BizException;
import com.sdy.common.model.Response;
import com.sdy.mvc.service.BaseService;
import com.sdy.supermarket.biz.model.GsNotice;
import com.sdy.usercenter.api.dto.ResourceDTO;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author 韩亚恒
 * @since 2019-07-23
 */
public interface GsNoticeService extends BaseService<GsNotice> {

    /**
     * 分页条件(条件可为空)查询
     *
     * @param noticeName
     * @param noticeText
     * @param noticeStatus
     * @param page (size current)
     * @return
     * @throws BizException
     */
    IPage<GsNotice> pageListGsNotice(String noticeName, String noticeText, Integer noticeStatus, Page<GsNotice> page);

    /**
     * 获取平台列表
     *
     * @return
     */
    List<ResourceDTO> getAppList();


    /**
     * 新增&修改方法，如果ID存在则修改，否则新增
     *
     * @param gsNotice
     * @return
     * @throws BizException
     */
    int saveOrUpdateGsNotice(GsNotice gsNotice) throws BizException;


    /**
     * 根据ID删除数据
     *
     * @param noticeId
     * @return
     * @throws BizException
     */
    int deleteGsNoticeById(Integer noticeId) throws BizException;

}
